package com.briup.product_source.util;

public enum ResultCode {
    SUCCESS(200,"操作成功"),
    ERROR(0,"操作失败"),


    //操作成功：2000-2999
    ADD_SUCCESS(2000,"新增成功"),
    UPDATE_SUCCESS(2000,"修改成功"),
    DELETE_SUCCESS(2000,"删除成功"),


    //参数错误： 4000-4999
    USER_ID_ERROR(4000,"用户ID不合法"),
    USER_NAME_REPEAT(4001,"用户名重复"),
    USER_PASSWORD_NULL(4002,"密码不能为空"),
    USER_PASSWORD_LENGTH(4003,"密码长度不能小于6位"),

    BOOK_INFO_NULL(4000,"参数为空"),
    FHID_NOT_EXIT(4001,"当前栏舍不存在,请新增"),
    FH_NAME_REPEAT(4002,"栏舍名重复"),
    FH_NAME_NULL(4003,"栏舍名不能为空"),
    DESC_NULL(4004,"描述不能为空"),
    USER_NOT_LOGIN(4005,"用户未登录"),
    USER_IS_NULL(4006,"用户名不存在"),
    PASSWORD_ERROR(4007,"密码错误"),
    TOKEN_IS_NULL(4008,"用户未登录"),
    TOKEN_ERROR(4009,"token错误"),
    ANIMAL_NULL(4010,"当前动物信息不存在"),
    USER_STATUS_ERROR(4011,"当前用户已禁用"),





    //服务器内部错误  5000-5999
    SERVER_INTER_ERROR(500,"程序内部错误,请联系管理员");



    private Integer code;
    private String message;


    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
